<section id="content">
    <h2 class="article" >{#PERSONNE_RECHERCHER#}</h2>
    
    <form name="formulaire" action="?action=rechercherPersonne" method="post" class="article buttons">
        
        <fieldset class="form-text break">
            <label>{#TITRE#}</label>
            <select name="titre">
                <option value=""></option>
                <option value="Monsieur">{#MONSIEUR#}</option>
                <option value="Madame">{#MADAME#}</option>
                <option value="Mademoiselle">{#MADEMOISELLE#}</option>
            </select>
        </fieldset>
        
        <fieldset class="form-text">
            <label>{#NOM#}</label>
            <input type="text" name="nom" value="" id="nom" class="validate[optional,custom[onlyLetter],length[0,20]] text-input"/> 
        </fieldset>

        <fieldset class="form-text">
            <label>{#PRENOM#}</label>
            <input type="text" name="prenom" value="" id="prenom" class="validate[optional,custom[onlyLetter],length[0,12]] text-input"/>
        </fieldset>

        <fieldset>
            <label>{#ROLE#}</label>
            <select name="role">
            	<option value="" selected="selected">---</option>
                {if isset($listeRoles)}
                {foreach from=$listeRoles item=role }
                 <option value="{$role->getNom()}">{$role->getNom()}</option>
                {/foreach}
                {/if}
            </select>
        </fieldset>

        <fieldset class="form-text">
            <label>{#LIEU#}</label>
            <input type="text" name="lieu" value="" id="lieu" class="validate[optional,custom[onlyLetter],length[0,20]] text-input"/>
        </fieldset>

        <fieldset class="form-actions">
            <input type="submit" class="submit" name="rechercherPersonne" value="{#RECHERCHER#}" />
        </fieldset>

    </form>   
        
        
    <h2 class="article">{#RESULTAT_RECHERCHE#}</h2>

 
            
    <table id="tableauRecherche" class="article">
        <thead>
            <tr>
                <th id="personneRechercheID" width="30px">{#ID#}</th>
                <th id="personneRechercheNom" width="100px">{#NOM#}</th>
                <th id="personneRecherchePrenom" width="100px">{#PRENOM#}</th>
                <th id="personneRechercheEmail" width="100px">{#EMAIL#}</th>
                {if (isset($groupe)) && ($groupe eq 'Super Administrateurs')}
                <th id="personneRechercheAction" width="50px"></th>
                {/if}
            </tr> 
        </thead>
        <tbody>
            {if isset($listePersonnes)}
                {foreach from=$listePersonnes item=record }
                    <tr class="{cycle values="ligne1,ligne2"}">
                        <td><a href ="?action=afficherPersonne&id={$record->getId()}">{$record->getId()}</a></td>
                        <td>{$record->getNom()}</td>
                        <td>{$record->getPrenom()}</td>
                        <td><a href ="mailto:{$record->getEmail()}">{$record->getEmail()}</a></td>
                        {if (isset($groupe)) && ($groupe eq 'Super Administrateurs')}
                        <td><a class="actions" href="?action=afficherSupprimerPersonne&id={$record->getId()}">{#SUPPRIMER#}</a></td>
                        {/if}
                    </tr>


                {/foreach}    
            {/if}     
        </tbody>  
    </table>

</section>
